/**
 * GruppeDAO.java
 *
 * author: Daniel Rudigier
 * date: 28.4.2008
 * project: ocumed
 * 
 * Interfaces:
 *  GruppeDAO
 */
package ocumed.persistenz.dao;

import java.util.List;

import ocumed.persistenz.hibernate.OcGruppe;

/**
 * DAO interface for OcGruppe
 */
public interface GruppeDAO extends DAOUserTransaction {

    /**
     * persist a object, and return the generated id
     *
     * @param transientInstance
     * @return the generated id
     */
    public Integer persist(OcGruppe transientInstance);

    /**
     * save or update object.
     *
     * @param instance
     */
    public void attachDirty(OcGruppe instance);

    /**
     * has to do with locking.
     * 
     * @param instance
     */
    public void attachClean(OcGruppe instance);

    /**
     * delete an instance.
     * 
     * @param persistentInstance
     */
    public void delete(OcGruppe persistentInstance);

    /**
     * merge instances 
     *
     * @param detachedInstance
     * @return
     */
    public OcGruppe merge(OcGruppe detachedInstance);

    /**
     * find by primary key.
     *
     * @param id
     * @return
     */
    public OcGruppe findById(int id);
    
    /**
     * find all entries.
     *
     * @return
     */
    public List<OcGruppe> findAll();
}